package com.wuxiaoge.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ResultBody {
    private String code;
    private String message;
    private Object result;

    public static ResultBody success(Object result) {
        return new ResultBody("200", "操作成功", result);
    }

    public static ResultBody error(String code, String message) {
        return new ResultBody(code, message, null);
    }
}

